/**
 * 异常上报
 * Created by wmm on 2018/5/16.
 */
import {Injectable} from '@angular/core';
import {HttpParams} from '@angular/common/http';

import {HttpUtil} from '../HttpUtil';

@Injectable()
export class ExceptionReportApi {

  constructor(public httpUtil: HttpUtil) {
  }

  //获取异常信息
  getExceptionReportInfo(planPositionId:string) {
    const params = new HttpParams().set("token", localStorage.getItem("token"))
      .set("planEntryId",planPositionId)
    return this.httpUtil.post("/api/exception/info", params);
  }


  //异常信息更改
  exceptionReport(planPositionId:string,planId:string,info:string) {
    const params = new HttpParams().set("token", localStorage.getItem("token"))
      .set("planEntryId",planPositionId)
      .set("planId",planId)
      .set("info",info)
    return this.httpUtil.post("/api/exception/report", params);
  }


}
